//This is the Header file for the Database Access Layer

#ifndef __DATABASE_H__
#define __DATABASE_H__

#include <stdlib.h>
#include <sqlite3.h>
#include "internal.h"
#include <time.h>

struct usage_stats {
    int id;
    int lockerNumber;
    time_t lockTime;
    time_t unlockTime;
    int adminUnlock;
};

struct key_values {
    int lockerNumber;
    char key[20];
};

int insert_usage_stats(int lockerNumber);

int update_usage_stats(int adminUnlock, int lockerNumber);

int insert_key_values(int lockerNumber, char key[]) ;

int delete_key_values(int lockerNumber) ;

void select_key_values(struct key_values *key_values);

#endif
